<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <f:view contentType="text/html">
        <h:head>
            <title>Login Hyper Mongo Admin</title>

            <style>
                .ui-widget {
                    font-size: 12px;
                }

                .ui-layout-north {                    
                    overflow:hidden !important;
                }
            </style>
        </h:head>
        <h:body>
            <p:layout fullPage="true">
                
                 <p:layoutUnit id="left" position="west" size="300" resizable="true" closable="true" collapsible="true" header="Options" minSize="200">
                </p:layoutUnit>
                <p:layoutUnit id="center" position="center">
                    <h:form id="form">
                        <p:growl id="growl" showDetail="true" life="3000" />  

                        <h:panelGrid columns="2" cellpadding="5">  
                            <h:outputLabel for="url" value="Host: " />  
                            <p:inputText id="url" value="#{connectBean.url}" required="true"  label="url" />
                            
                            <h:outputLabel for="port" value="Port :" />  
                            <p:inputText id="port" value="#{connectBean.port}" label="port" required="true" />
                            
                            <h:outputLabel for="username" value="Username:" />  
                            <p:inputText id="username" value="#{connectBean.userName}" label="username" />  

                            <h:outputLabel for="password" value="Password:" />  
                            <h:inputSecret id="password" value="#{connectBean.password}" label="password" />  

                            <f:facet name="footer">  
                                <p:commandButton id="loginButton" value="Connect" update="growl"   
                                                 actionListener="#{connectBean.tryConnect()}"   />  
                                
                                
                                              <p:commandButton id="loginButton2" value="Connect" update="growl"   
                                                               actionListener="#{connectBean.checkLogin()}"   />  
                            </f:facet>  
                        </h:panelGrid>  
                    </h:form>  
                </p:layoutUnit>
            </p:layout>
        </h:body>
    </f:view>
</html>
